/* 基础样式重置 */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	background-color: #F8F9FA;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
	color: #2C3E50;
	line-height: 1.6;
}

/* 应用容器 */
.app-container {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
}

/* 顶部状态栏 */
.app-header {
	background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
	color: white;
	padding: 16px 20px 12px;
	box-shadow: 0 2px 12px rgba(74, 144, 226, 0.15);
	position: relative;
	z-index: 10;
}

.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 400px;
	margin: 0 auto;
	gap: 12px;
}

.app-title {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.app-icon {
	font-size: 20px;
}

.app-name {
	font-size: 16px;
	font-weight: 600;
}

.header-stats {
	display: flex;
	align-items: center;
}

.stat-badge {
	display: flex;
	align-items: center;
	gap: 4px;
	background: rgba(255, 255, 255, 0.2);
	padding: 6px 10px;
	border-radius: 16px;
	font-size: 12px;
	font-weight: 500;
	backdrop-filter: blur(10px);
}

.stat-icon {
	font-size: 12px;
}

.stat-text {
	font-weight: 600;
}

.current-group {
	display: flex;
	align-items: center;
	gap: 4px;
	background: rgba(255, 255, 255, 0.2);
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 12px;
	backdrop-filter: blur(10px);
	flex-shrink: 0;
}

.group-icon {
	font-size: 12px;
}

.group-text {
	font-weight: 500;
}

/* 主内容区 */
.app-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 20px;
	padding-bottom: 80px;
	max-width: 400px;
	margin: 0 auto;
	width: 100%;
}

.app-content > div {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
}

/* 拍照容器 */
.camera-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	gap: 24px;
}

/* 拍照预览中心 */
.preview-center {
	width: 100%;
	display: flex;
	justify-content: center;
}

.preview-area {
	width: 100%;
	max-width: 320px;
	background: white;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	position: relative;
}

.preview-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	text-align: center;
	background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
	min-height: 280px;
}

.camera-icon {
	font-size: 48px;
	margin-bottom: 16px;
	opacity: 0.6;
}

.placeholder-text {
	font-size: 16px;
	font-weight: 500;
	color: #6C757D;
	margin-bottom: 8px;
}

.placeholder-tip {
	font-size: 12px;
	color: #ADB5BD;
	line-height: 1.4;
}

.preview-image-wrapper {
	width: 100%;
	height: 280px;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.preview-image-wrapper img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 操作按钮区 */
.action-buttons {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.action-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 16px 24px;
	border: none;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	min-width: 80px;
	gap: 4px;
	outline: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
	transform: scale(0.95);
}

.btn-icon {
	font-size: 20px;
}

.btn-text {
	font-size: 12px;
}

.primary-btn {
	background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
	color: white;
}

.primary-btn:hover {
	box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
}

.secondary-btn {
	background: linear-gradient(135deg, #6C757D 0%, #495057 100%);
	color: white;
}

.secondary-btn:hover {
	box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

.success-btn {
	background: linear-gradient(135deg, #28A745 0%, #1E7E34 100%);
	color: white;
}

.success-btn:hover {
	box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

/* 统计信息 */
.stats-info {
	display: flex;
	gap: 24px;
	justify-content: center;
	margin-top: 8px;
}

.stat-item {
	display: flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.8);
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 12px;
	color: #6C757D;
	backdrop-filter: blur(10px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-icon {
	font-size: 14px;
}

/* 分组容器 */
.classify-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	width: 100%;
	max-width: 320px;
}

.classify-header {
	text-align: center;
	margin-bottom: 16px;
}

.classify-header h3 {
	font-size: 20px;
	font-weight: 600;
	color: #2C3E50;
	margin-bottom: 8px;
}

.classify-header p {
	font-size: 14px;
	color: #6C757D;
}

/* 底部导航栏 */
.app-tabbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	height: 70px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(20px);
	border-top: 1px solid rgba(0, 0, 0, 0.05);
	display: flex;
	justify-content: space-around;
	align-items: center;
	z-index: 100;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.tabbar-btn {
	flex: 1;
	background: none;
	border: none;
	outline: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 8px 0;
	cursor: pointer;
	transition: all 0.3s ease;
	color: #ADB5BD;
	gap: 4px;
}

.tab-icon {
	font-size: 20px;
	transition: transform 0.3s ease;
}

.tab-text {
	font-size: 10px;
	font-weight: 500;
	transition: color 0.3s ease;
}

.tabbar-btn.active {
	color: #4A90E2;
}

.tabbar-btn.active .tab-icon {
	transform: scale(1.1);
}

.tabbar-btn:hover {
	color: #4A90E2;
}

/* 保留原有按钮样式（兼容性） */
.main_button {
	width: 120px;
	height: 50px;
	border-width: 0px;
	border-radius: 8px;
	background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
	cursor: pointer;
	outline: none;
	font-family: inherit;
	color: white;
	font-size: 16px;
	font-weight: 600;
	margin: 10px 0;
	transition: all 0.3s ease;
	box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.main_button:hover {
	box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
	transform: translateY(-1px);
}

.main_button:active {
	transform: translateY(0);
}

.btn-icon {
	font-size: 18px;
}

.btn-text {
	font-size: 14px;
}

/* 响应式适配 */
@media (max-width: 360px) {
	.app-content {
		padding: 16px;
	}
	
	.action-buttons {
		gap: 8px;
	}
	
	.action-btn {
		padding: 12px 20px;
		min-width: 70px;
	}
	
	.stats-info {
		gap: 16px;
	}
	
	.stat-item {
		padding: 6px 12px;
		font-size: 11px;
	}
}

/* 照片管理界面样式 */
.gallery-container {
	padding: 20px;
	height: 100%;
	overflow-y: auto;
}

.gallery-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 1px solid #e0e0e0;
}

.gallery-header h3 {
	margin: 0;
	color: #333;
	font-size: 18px;
	font-weight: 600;
}

.gallery-stats {
	display: flex;
	align-items: center;
}

.stat-badge {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
}

.filter-bar {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
	align-items: center;
}

#group-filter {
	flex: 1;
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 8px;
	background: white;
	font-size: 14px;
	color: #333;
}

.refresh-btn {
	padding: 10px;
	background: #f8f9fa;
	border: 1px solid #ddd;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.refresh-btn:hover {
	background: #e9ecef;
}

.photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 12px;
	padding-bottom: 20px;
}

.photo-item {
	position: relative;
	aspect-ratio: 1;
	border-radius: 12px;
	overflow: hidden;
	background: #f8f9fa;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.photo-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.photo-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.photo-item:hover img {
	transform: scale(1.05);
}

.photo-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(transparent, rgba(0,0,0,0.7));
	padding: 8px;
	color: white;
	font-size: 11px;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.photo-item:hover .photo-overlay {
	opacity: 1;
}

.photo-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.photo-time {
	font-size: 10px;
	opacity: 0.8;
}

.photo-group {
	background: rgba(255,255,255,0.2);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 10px;
}

.empty-state {
	grid-column: 1 / -1;
	text-align: center;
	padding: 60px 20px;
	color: #999;
}

.empty-icon {
	font-size: 48px;
	margin-bottom: 16px;
	opacity: 0.5;
}

.empty-text {
	font-size: 16px;
	font-weight: 500;
	margin-bottom: 8px;
	color: #666;
}

.empty-tip {
	font-size: 14px;
	opacity: 0.7;
}

/* 模态框样式 */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 20px;
}

.modal-content {
	background: white;
	border-radius: 16px;
	max-width: 90vw;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid #e0e0e0;
}

.modal-header h4 {
	margin: 0;
	color: #333;
	font-size: 18px;
	font-weight: 600;
}

.close-btn {
	background: none;
	border: none;
	font-size: 24px;
	color: #999;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.3s ease;
}

.close-btn:hover {
	background: #f5f5f5;
	color: #666;
}

.modal-body {
	flex: 1;
	overflow: auto;
	padding: 20px;
}

#modal-photo {
	width: 100%;
	max-height: 60vh;
	object-fit: contain;
	border-radius: 8px;
	margin-bottom: 20px;
}

.photo-info {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.info-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f0;
}

.info-label {
	font-weight: 500;
	color: #666;
	font-size: 14px;
}

.info-item span:last-child {
	color: #333;
	font-size: 14px;
}

.modal-footer {
	display: flex;
	gap: 12px;
	padding: 20px;
	border-top: 1px solid #e0e0e0;
}

.modal-btn {
	flex: 1;
	padding: 12px 20px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.delete-btn {
	background: #ff4757;
	color: white;
}

.delete-btn:hover {
	background: #ff3742;
}

.share-btn {
	background: #2ed573;
	color: white;
}

.share-btn:hover {
	background: #26d0ce;
}

/* 响应式设计 */
@media (max-width: 480px) {
	.photo-grid {
		grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
		gap: 8px;
	}
	
	.gallery-container {
		padding: 15px;
	}
	
	.modal-content {
		max-width: 95vw;
		max-height: 95vh;
	}
	
	.modal-body {
		padding: 15px;
	}
	
	.modal-footer {
		padding: 15px;
	}
}

/* 加载动画 */
.loading {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 40px;
}

.loading::after {
	content: '';
	width: 30px;
	height: 30px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #667eea;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Toast提示样式 */
.toast {
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%) translateY(-100px);
	background: rgba(0, 0, 0, 0.8);
	color: white;
	padding: 12px 20px;
	border-radius: 8px;
	font-size: 14px;
	z-index: 10000;
	opacity: 0;
	transition: all 0.3s ease;
	max-width: 80vw;
	text-align: center;
}

.toast.show {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

.toast-success {
	background: rgba(46, 213, 115, 0.9);
}

.toast-error {
	background: rgba(255, 71, 87, 0.9);
}

.toast-warning {
	background: rgba(255, 165, 2, 0.9);
}

.toast-info {
	background: rgba(52, 152, 219, 0.9);
}

/* 统计页面样式 */
.stats-container {
	padding: 20px;
	height: 100%;
	overflow-y: auto;
}

.stats-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 1px solid #e0e0e0;
}

.stats-header h3 {
	margin: 0;
	color: #333;
	font-size: 18px;
	font-weight: 600;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
	padding-bottom: 20px;
}

.stat-card {
	background: white;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	overflow: hidden;
	transition: all 0.3s ease;
}

.stat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 16px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.card-icon {
	font-size: 18px;
}

.card-title {
	font-size: 16px;
	font-weight: 600;
}

.card-content {
	padding: 16px;
}

.stat-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f0;
}

.stat-row:last-child {
	border-bottom: none;
}

.stat-label {
	color: #666;
	font-size: 14px;
}

.stat-value {
	color: #333;
	font-size: 16px;
	font-weight: 600;
}

/* 趋势图样式 */
.trend-chart {
	height: 120px;
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 4px;
	padding: 10px 0;
}

.trend-bar {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 2px 2px 0 0;
	min-width: 20px;
	position: relative;
	transition: all 0.3s ease;
}

.trend-bar:hover {
	opacity: 0.8;
}

.trend-label {
	position: absolute;
	bottom: -20px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 10px;
	color: #666;
	white-space: nowrap;
}

.trend-value {
	position: absolute;
	top: -20px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 10px;
	color: #333;
	font-weight: 600;
}

/* 排行榜样式 */
.ranking-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ranking-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 0;
}

.ranking-info {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ranking-number {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	font-size: 12px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ranking-number.rank-1 {
	background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.ranking-number.rank-2 {
	background: linear-gradient(135deg, #C0C0C0 0%, #A0A0A0 100%);
}

.ranking-number.rank-3 {
	background: linear-gradient(135deg, #CD7F32 0%, #B8860B 100%);
}

.ranking-name {
	font-size: 14px;
	color: #333;
	font-weight: 500;
}

.ranking-count {
	font-size: 14px;
	color: #666;
}

/* 分组分布样式 */
.distribution-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.distribution-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 0;
}

.distribution-info {
	display: flex;
	align-items: center;
	gap: 8px;
}

.distribution-icon {
	font-size: 16px;
}

.distribution-name {
	font-size: 14px;
	color: #333;
}

.distribution-bar {
	flex: 1;
	height: 6px;
	background: #f0f0f0;
	border-radius: 3px;
	margin: 0 12px;
	overflow: hidden;
}

.distribution-fill {
	height: 100%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 3px;
	transition: width 0.3s ease;
}

.distribution-count {
	font-size: 12px;
	color: #666;
	min-width: 30px;
	text-align: right;
}

/* 响应式适配 */
@media (max-width: 360px) {
	.stats-container {
		padding: 16px;
	}
	
	.stats-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	
	.card-header {
		padding: 12px;
	}
	
	.card-content {
		padding: 12px;
	}
}




.export-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	justify-content: center;
	margin-top: 32px;
  }
  .export-action-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 160px;
	padding: 28px 16px 20px 16px;
	border-radius: 18px;
	border: none;
	box-shadow: 0 4px 24px rgba(0,0,0,0.08);
	background: #fff;
	cursor: pointer;
	transition: box-shadow 0.2s, transform 0.2s;
	position: relative;
  }
  .export-action-btn .btn-icon {
	font-size: 36px;
	margin-bottom: 12px;
  }
  .export-action-btn .btn-title {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 6px;
  }
  .export-action-btn .btn-desc {
	font-size: 13px;
	color: #888;
  }
  .export-action-btn.primary {
	background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
	color: #fff;
  }
  .export-action-btn.secondary {
	background: linear-gradient(135deg, #6C757D 0%, #495057 100%);
	color: #fff;
  }
  .export-action-btn.tertiary {
	background: #f3f3f3;
	color: #bbb;
	cursor: not-allowed;
  }
  .export-action-btn:active {
	transform: scale(0.97);
	box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }
  @media (max-width: 600px) {
	.export-actions {
	  flex-direction: column;
	  gap: 18px;
	}
	.export-action-btn {
	  width: 100%;
	  min-width: 0;
	}
  }
  